/*
 * @Date: 2022-11-19 12:00:54
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-11-29 11:46:52
 * @FilePath: \vue-admin-ts\src\views\main\system\user\options.ts
 * @Description: something
 */
import { FormOptions } from "@/components/Form/type/type";
import { TableOptions } from "@/components/Table/type/type";

export const formItems: FormOptions[] = [
  {
    type: "input",
    label: "ID：",
    prop: "id",
    placeholder: "请输入用户ID",
  },
  {
    type: "input",
    label: "真实姓名：",
    prop: "realname",
    placeholder: "请输入真实姓名",
  },
  {
    type: "input",
    label: "电话号码：",
    prop: "cellphone",
    placeholder: "请输入电话号码",
  },
  {
    type: "select",
    label: "用户状态：",
    prop: "enable",
    placeholder: "请选择用户状态",
    attrs: {
      clearable: true,
      style: {
        width: "100%",
      },
    },
    children: [
      {
        type: "option",
        prop: "cellphone",
        value: 1,
        label: "启用",
      },
      {
        type: "option",
        prop: "cellphone",
        value: 0,
        label: "禁用",
      },
    ],
  },
  {
    type: "date-picker",
    label: "创建时间：",
    prop: "createAt",
    attrs: {
      type: "daterange",
      startPlaceholder: "开始时间",
      endPlaceholder: "结束时间",
    },
  },
];

export const userTableOptions: TableOptions[] = [
  {
    prop: "id",
    label: "ID",
  },
  {
    prop: "realname",
    label: "真实姓名",
  },
  {
    prop: "name",
    label: "用户名",
  },

  {
    prop: "cellphone",
    label: "手机号码",
  },
  {
    prop: "createAt",
    label: "创建时间",
    align: "center",
    slot: "createAt",
  },
  {
    prop: "updateAt",
    label: "更新时间",
    align: "center",
    slot: "updateAt",
  },
  {
    prop: "enable",
    label: "状态",
    align: "center",
    slot: "enable",
    width: "100",
  },
  {
    prop: "operation",
    slot: "operation",
    label: "操作",
    align: "center",
    action: true,
  },
];
